package utn.frd.domain;

import java.io.Serializable;

import javax.jdo.annotations.IdGeneratorStrategy;
import javax.jdo.annotations.IdentityType;
import javax.jdo.annotations.PersistenceCapable;
import javax.jdo.annotations.Persistent;
import javax.jdo.annotations.PrimaryKey;

@PersistenceCapable(identityType = IdentityType.APPLICATION)
public class Student implements Serializable {

	private static final long serialVersionUID = 1L;

	@PrimaryKey
	@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
	private String email;
	@Persistent
	private String name;
	@Persistent
	private Long[] coursesTaken;

	/*
	 * CONSTRUCTORES
	 */
	public Student(){}
	
	public Student(String email, String name) {
		setEmail(email);
		setName(name);
	}

	/*
	 * GETTERS & SETTERS
	 */
	public String getEmail() {
		return email;
	}
	public void setEmail(String email) {
		this.email = email;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public Long[] getCourses() {
		return coursesTaken;
	}
	public void setCourses(Long[] courses) {
		this.coursesTaken = courses;
	}

}
